<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>Insert title here</title>
		<script src="/js/jquery.min.js"></script>
	</head>
	<body>
		chatid:<input type="text" name="chatid" id="chatid"><br>
		sender:<input type="text" name="sender" id="sender"><br>
		state:<input type="text" name="state" id="state"><br>
		<input type="button" value="同意" onclick="agree()">
		<input type="button" value="不同意" onclick="disagree()">
		<script>
			//同意教练认证
			function agree() {
				$.ajax({
					url: "/admin/agreecoach",
					type: "post",
					data: {
						chatid:$("#chatid").val(),
						sender:$("#sender").val(),
						state:$("#state").val()
					},
					dataType: "json",
					success: function(data) {

					}
				})
			}
			//驳回教练认证
			function disagree() {
				$.ajax({
					url: "/admin/disagreecoach",
					type: "post",
					data: {
						chatid:$("#chatid").val(),
						sender:$("#sender").val(),
						state:$("#state").val()	
					},
					dataType: "json",
					success: function(data) {

					}
				})
			}
		</script>
	</body>
</html>
